


	<script src="${path.skinPath }js/jquery.min.js?v=${hf_version!}"></script>
	<script src="${path.skinPath }js/bootstrap.min.js?v=${hf_version!}"></script>
	<script src="${path.skinPath }js/plugins/metisMenu/jquery.metisMenu.js?v=${hf_version!}"></script>
	<script src="${path.skinPath }js/plugins/slimscroll/jquery.slimscroll.min.js?v=${hf_version!}"></script>
	<script src="${path.skinPath }js/plugins/layer/layer.min.js?v=${hf_version!}"></script>
	<script src="${path.skinPath }js/hplus.min.js?v=${hf_version!}"></script>
	<script type="text/javascript" src="${path.skinPath }js/contabs.min.js?v=${hf_version!}"></script>
	
	<!-- <script src="${path.skinPath }js/plugins/pace/pace.min.js?v=${hf_version!}"></script> -->
    
    <script src="${path.skinPath }js/content.min.js?v=1.0.0"></script>


	<!-- 表格 -->
    <script src="${path.skinPath }js/plugins/bootstrap-table/bootstrap-table.min.js?v=${hf_version!}"></script>
    <script src="${path.skinPath }js/plugins/bootstrap-table/bootstrap-table-mobile.min.js?v=${hf_version!}"></script>
    <script src="${path.skinPath }js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js?v=${hf_version!}"></script>
    <script src="${path.skinPath }js/plugins/bootstrap-table/bootstrap-table-resizable.js?v=${hf_version!}"></script>
    <script src="${path.skinPath }js/plugins/bootstrap-table/colResizable-1.5.source.js?v=${hf_version!}"></script>

    <!-- 友好提示框 -->
    <script src="${path.skinPath }js/plugins/sweetalert/sweetalert.min.js?v=${hf_version!}"></script>

    <!-- 广播提示信息 -->
    <script src="${path.skinPath }js/plugins/toastr/toastr.min.js?v=${hf_version!}"></script>

	<!-- 通用方法 -->
	<script type="text/javascript" src="${path.commonPath }js/js_func.js?v=${hf_version!}"></script>

	<!-- md5处理方法 -->
	<Script type="text/javascript" src="${path.commonPath }tools/md5.js?currentTime=${currentTime}"></Script>

	<!-- contextmenu菜单工具 -->
	<Script type="text/javascript" src="${path.skinPath }hongfeng/js/jquery.contextmenu.r2.js?currentTime=${currentTime}"></Script>

	<!-- 弹窗 -->
	<script type="text/javascript" src="${path.commonPath }tools/artdialog/dialog-plus-min.js"></script>

	<!-- 表单验证 -->
	<!--
	<script type="text/javascript" src="${path.commonPath }tools/validform/Validform_v5.3.2_min.js"></script>
	-->
	<script type="text/javascript" src="${path.skinPath }js/plugins/validate/jquery.validate.min.js"></script>
    <script type="text/javascript" src="${path.skinPath }js/plugins/validate/messages_zh.min.js"></script>


	<!-- 分页查询方法 -->
	<script type="text/javascript" src="${path.commonPath }hfutils/HFPager.js?v=${hf_version!}"></script>
	<!-- 表单提交等 ajax方法 -->
	<script type="text/javascript" src="${path.commonPath }hfutils/HFAjax.js?v=${hf_version!}"></script>
	<!-- 日历控件 -->
	<!--<script type="text/javascript" src="${path.commonPath }assets/scripts/My97DatePicker/WdatePicker.js"></script>-->
	<script src="${path.commonPath }assets/scripts/layer/laydate/laydate.js"></script>
	<script src="${path.skinPath }js/plugins/datapicker/bootstrap-datepicker.js"></script>
	<!-- 编辑框 -->
    <!-- <script src="${path.skinPath }js/plugins/summernote/summernote.min.js"></script>
    <script src="${path.skinPath }js/plugins/summernote/summernote-zh-CN.js"></script> -->
    
    <script src="${path.skinPath }js/plugins/kindeditor/kindeditor-all.js"></script>
    <script charset="utf-8" src="${path.skinPath }js/plugins/kindeditor/zh-CN.js"></script>
    
    <!-- Base64编码 -->
    <script src="${path.commonPath }tools/base64.js"></script>
    <script src="${path.skinPath }js/base64.js"></script>
    
    <!-- JS 模板引擎 -->
    <script src="${path.skinPath }js/plugins/artTemplate/template.js"></script>
    
    <!-- 上传文件插件 -->
    <script src="${path.commonPath }tools/yxAjaxUpload/ajaxfileupload.js"></script>
    <script src="${path.commonPath }tools/yxAjaxUpload/jquery.yxAjaxUpload.js"></script>
    
    <!-- 裁剪图片插件 -->
    <script src="${path.commonPath }tools/jcrop/jquery.Jcrop.js"></script>
    
<script type="text/javascript">

//$("body").children("div:first-child").show();

//表格请求响应方法(分页)
function pagerTableResponseHandler(res) {
	if(res.state == 0){
		// alert(JSON.stringify(res.result.list));
		for(var i in res.result.list){	//转换一下ID的值，直接使用ID在某些地方不适用
			if(isSet(res.result.list[i].id)){
				res.result.list[i].tableid = res.result.list[i].id;
			}else if(isSet(res.result.list[i].ID)){
                res.result.list[i].tableid = res.result.list[i].ID;
            }else{
                res.result.list[i].tableid = "noid";
            }
		}

		var json = {};
		json.total = res.result.total;
		json.rows = res.result.list;
		return json;
	}
	return [];
}
//表格请求响应方法(不分页)
function tableResponseHandler(res) {
	if(res.state == 0){
		// alert(JSON.stringify(res.result.list));
		for(var i in res.result.list){	//转换一下ID的值，直接使用ID在某些地方不适用
			if(isSet(res.result.list[i].id)){
				res.result.list[i].tableid = res.result.list[i].id;
			}else if(isSet(res.result.list[i].ID)){
                res.result.list[i].tableid = res.result.list[i].ID;
            }else{
                res.result.list[i].tableid = "noid";
            }
		}
		return res.result.list;
	}
	return [];
}

//初始化表格
function initBSTable(tableid, data){

	// var data = [{"id":2,"order_num":0,"tag_desc":"","tag_title":"酒店标签","tag_type":2},{"id":3,"order_num":0,"tag_desc":"","tag_title":"设备标签","tag_type":3},{"id":4,"order_num":0,"tag_desc":"","tag_title":"用户标签","tag_type":1},{"id":5,"order_num":0,"tag_desc":"","tag_title":"asdf","tag_type":2},{"id":6,"order_num":0,"tag_desc":"","tag_title":"标签aaa","tag_type":1}];

	$('#' + tableid).bootstrapTable(data);
    $('.bootstrap-table .btn-default').addClass('btn-outline');
}

//搜索表格
function searchBSTable(tableid, formid){
	$('#' + tableid).bootstrapTable('refreshOptions',{pageNumber:1});
	$('#' + tableid).bootstrapTable('refresh', {query: $('#' + formid).serializeObject()});
}

//获取当前选中的行的值
function getIdSelections(tableid) {
    return $.map($('#' + tableid).bootstrapTable('getSelections'), function (row) {
    	if (row.id) {
    		return row.id
    	} else {
	        return row.ID
    	}
    });
}
//获取当前选中的行的某个值
function getValSelections(tableid,colid) {
    return $.map($('#' + tableid).bootstrapTable('getSelections'), function (row) {
        var str = " var colval = row."+colid;
        eval(str);
        return colval
    });
}

//刷新表格
function refreshBSTable(tableid){
	$('#' + tableid).bootstrapTable('refresh');	//刷新表格
}






function HFLogout(){
	HFAjax("${path.servicePath }/index/logout.do", {}, function(result){
      if(result.state == 0){
	      window.top.location.href = "${path.viewPath }/admin/index.do";
	    }
    });
}

function setParams(param){
	var params = $('#bs-form').serializeObject();
	for(var key in params){
		param[key] = params[key];
	}
	//alert(JSON.stringify(param));
    return param;
}


// 显示 loading
function showHFLoading(){
	var imageType = Math.round(Math.random());	//产生 0 或者 1

	var image = '${path.commonPath }images/HFLoading' + imageType + '.gif?v=1';

	var html = '<div id="loadingMaskAndImage" style="position: absolute; width: ' + $(window).width() + 'px; height: ' + $(window).height() + 'px; line-height:' + $(window).height() + 'px; top: 0px; left: 0px; text-align: center; z-index: 999; opacity: 0.6; background: rgb(204, 204, 204); display: table-cell;vertical-align:middle;"><img src="' + image + '" style="_margin-top: expression(( ' + $(window).height() + ' - this.height ) / 2);" /></div>'

	$('body').append(html);


  	// setTimeout("hideLoading()", 5000);
}
function hideHFLoading(){
	if($('#loadingMaskAndImage').length > 0){
		$('#loadingMaskAndImage').remove();
	}
}

//列表日期格式化
function dateFormatter(value, row, index) {
	var return_value = "-";
	if(value!=null){
		return_value = value.substr(0,10);
	}
	return return_value;
}

//计算弹窗里面的内容高度
function initDialogPanel(){
	var bodyHeight = $(window).height();
	$('.dialog-panel-body').height(bodyHeight);
}

//新增反馈的跳转方法
function feedbackAdd(class_id, belong_type, belong_code, belong_name){
    winGo('${path.contextPath }/feedback/feedbackedit.do?class_id='+class_id+'&belong_type='+belong_type+'&belong_code='+belong_code+'&belong_name='+Base64.encodeURI(belong_name)+'&back=1');
}

//FAQ   repoCode: FAQType
function showFAQ(repoCode){
	openDialog('faq', 'FAQ', '${path.viewPath }repo/repofaq.do?repoCode='+repoCode, '', 800, 500, function(){
 });
}
</script>



